package com.csdj.DriverSchoolSystem.controller;

import com.csdj.DriverSchoolSystem.common.WebResult;
import com.csdj.DriverSchoolSystem.entity.CityArea;
import com.csdj.DriverSchoolSystem.service.ICityAreaService;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import javax.annotation.Resource;
import java.util.List;

@Controller
public class CityAreaController {
    @Resource
    private ICityAreaService icityAreaService;

    @ResponseBody
    @PostMapping("selCa")
    public WebResult selCa(){
        List<CityArea> list = icityAreaService.selCa();
        WebResult webResult = new WebResult();
        webResult.putData("list",list);
        return webResult;
    }
}
